<template>
  <view class="outBox" :style="{'background-color':bgColor}">
    <view class="searchBox" :style="{'border-radius':radius+'px'}" @click="searchHandler">
      <view>
        <uni-icons type="search" size="17"></uni-icons>
      </view>
      <view>
        <text>搜索</text>
      </view>
    </view>
  </view>
</template>
<script>
  export default {
    props: {
      bgColor: {
        type: String,
        default: '#55aaff'
      },
      radius: {
        type: Number,
        default: 18
      }
    },
    methods:{
      searchHandler(){
        uni.$emit('click')
        uni.navigateTo({
          url:'/packageA/search/search'
        })
      }
    }
  }
</script>
<style>
  .outBox {
    height: 60px;
    align-items: center;
    padding: 0 10px;
  }

  .searchBox {
    display: flex;
    background-color: white;
    height: 36px;
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  text {
    margin-left: 10px;
  }
</style>